﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>yueim-manager</title>
    <link rel="stylesheet" href="./js/layui/css/layui.css">
</head>
<body >
  <div class="layui-main">
      <div>
          <div style="padding: 20px;">
              <button type="button" id="refresh" class="layui-btn layui-btn-normal">刷新</button>
          </div>
          <table id="demo" lay-filter="test">

          </table>
      </div>
  </div>
</body>
<script src="./js/jquery.min.js"></script>
<script src="./js/layui/layui.js"></script>
<script src="./js/config.js"></script>
<script src="./js/websocket-client.js"></script>
<script src="./js/chat.js"></script>
<script>
    layui.use('table', function(){
        var table = layui.table;
        //第一个实例
        var data_table = table.render({
            elem: '#demo'
            ,height: 312
            ,cols: [[ //表头
                ,{field: 'nodeAddress', title: '节点地址',width:350}
                ,{field: 'users', title: '连接用户数',sort: true}
                ,{field: 'devices', title: '连接终端数',}
                ,{field: 'cacheRoutes', title: '路由缓存容量'}
                ,{field: 'sendMsgs', title: '节点收发信息数',sort: true}
                ,{field: 'jvmFreeMemory', title: 'jvm空闲内存'}
                ,{field: 'jvmMaxMemory', title: 'jvm最大可用内存'}
            ]],
            data:[]
        });
        chat.init({'table':data_table});
        $('#refresh').click(function () {
            chat.sendMsg();
        });
    });
</script>
</html>

